package com.example.spring.bean.load08lifecycle.javaJSR;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

class PeachJSR {

    public PeachJSR() {
        System.out.println("Peach...constructor....");
    }

    /**
     * 对象创建并赋值之后调用
     */
    @PostConstruct
    public void init() {
        System.out.println("Peach...postConstruct...");
    }

    /**
     * 容器移除对象之前回调通知，销毁bean
     */
    @PreDestroy
    public void destroy() {
        System.out.println("Peach...preDestroy...");
    }
}